﻿using System;
using System.Windows.Forms;
using Autodesk.Revit.UI;
using YJKSparseDistance.Properties;
using YJKSparseDistance.ViewLayer;
using YJKRevitKernel.FormUtility.ModelessFormControlSuite.ControlLayer;
using YJKRevitKernel.FormUtility.ModelessFormControlSuite.ModelLayer;

namespace YJKSparseDistance.ControlLayer
{
	public class LoopMangerNoneSwitch_EvacuationDistance : BaseLoopMangerNoneSwitch
	{
		public string StrUseGuid
		{
			get
			{
				return this.m_strUseGuid;
			}
			protected set
			{
				this.m_strUseGuid = value;
			}
		}

		public LoopMangerNoneSwitch_EvacuationDistance(UIDocument inputUiDoc, IModelessFormNoneSwitch inputForm, IWin32Window inputParentHandle = null, PickObjectMethod inputPickMethod = null, string inputGuid = null) : base(inputUiDoc, inputForm, inputParentHandle, inputPickMethod)
		{
			if (inputGuid != null)
			{
				this.StrUseGuid = inputGuid;
			}
		}

		protected override void DoBeforeContinue()
		{
			LocationAWayBean tempLocationAWayBean = (this.m_useForm as ResultForm).TempLocationAWayBean;
			if (tempLocationAWayBean != null)
			{
				EventUseMethod.LocationAWay(tempLocationAWayBean.UseUIDoc, tempLocationAWayBean.UseBean, tempLocationAWayBean.UseForm);
			}
		}

		protected override void DoAfterWhile()
		{
			EventUseMethod.AddValue(this.StrUseGuid, (this.m_useForm as ResultForm).UseUIDocument, this.m_useForm as ResultForm);
		}

		private string m_strUseGuid = Resources.Str_GuidForEvacuation;
	}
}
